﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <form id="feedbackForm" action="/Account/Feedback" method="post">
    <div class="faqs">
        <div class="why_l">
            <ul class="why_l_a">
                <li>
                    <%= Html.ActionLink("Contact Support", "ContactSupport", "Account")%></li>
                <li>
                    <%= Html.ActionLink("FAQs", "Faqs", "Account")%></li>
                <li>Feedback</li>
                <li></li>
            </ul>
        </div>
        <div class="faqs_right">
            <div class="faqs_right_box">
                <h1>
                    Feedback</h1>
                <p>
                    Do you have an ideas that would help improve your assessments or training programme?
                    Please send us your thoughts and ideas in the box below. We will send them to the
                    relevant team.
                </p>
            </div>
            <div class="feedback">
                <div class="feedback_box1">
                </div>
                <div class="feedback_box2">
                    <div class="feedback_box2_a">
                        <div class="feedback_box2_b">
                            <div class="feedback_boxa">
                                Name:</div>
                            <div class="feedback_boxb">
                                <%if (Session["User"] != null)
                                  { %>
                                <input name="name" id="name" type="text" readonly="readonly"  value=" <%=(Session["User"] as CognisessDA.User).Username %>"/>
                            
                            <%}
                                  else
                                  {%>
                                  <input name="name" id="name" type="text"  value=""/>
                            <%} %>
                            </div>
                        </div>
                        <div class="feedback_box2_b">
                            <div class="feedback_boxa">
                                Email:</div>
                            <div class="feedback_boxb">
                             <%if (Session["User"] != null)
                                  { %>
                                <input name="email" id="email" type="text" readonly="readonly"  value="<%=(Session["User"] as CognisessDA.User).Email %>" />
                               <%}
                                  else
                                  {%>
                                  <input name="email" id="email" type="text"  value=""/>
                            <%} %> 
                        </div>
                        <div class="feedback_box2_b">
                            <div class="feedback_boxa">
                                Country:</div>
                            <div class="feedback_boxb">
                                <select name="country" id="country">
                                    <option value="">Select</option>
                                    <option>Select</option>
                                </select></div>
                        </div>
                        <div class="feedback_box2_b">
                            <div class="feedback_boxa">
                                Subject:</div>
                            <div class="feedback_boxb">
                                <select name="subject" id="subject">
                                    <option value="">Select</option>
                                    <option>Select</option>
                                </select></div>
                        </div>
                        <div class="feedback_box2_b">
                            <div class="feedback_boxa">
                                Suggestion / Comment:</div>
                            <div class="feedback_boxb">
                                <textarea name="comment" id="comment" cols="" rows=""></textarea>
                            </div>
                        </div>
                        <div class="feedback_box3_b">
                            <div class="feedback_boxa1">
                            </div>
                            <div class="feedback_boxb1">
                                <input type="image" name="" id="" src="../../Content/images/support_button.gif" />
                            </div>
                        </div>
                    </div>
                </div>
                <div class="feedback_box3">
                </div>
            </div>
        </div>
    </div>
    </form>
    <style type="text/css">
        .error
        {
            text-align: left;
            color: Red;
        }
    </style>

    <script>
        $().ready(function() {
            $("#feedbackForm").validate({
                rules: {
                    name: { required: true, rangelength: [6, 20] },
                    email: { required: true, email: true },
                    country: { required: true, digits: true },
                    subject: { required: true, digits: true },
                    comment: { required: true }
                },
                messages: {
                    name: { required: "Please enter your UserName.", rangelength: "UserName must be in 6-12 between characters." },
                    email: { required: "Please enter your Email.", email: "Please enter a valid Email accounts" },
                    country: { required: "Please select your Country.", digits: "Please select your Country." },
                    subject: { required: "Please select your Subject.", digits: "Please select your Subject." },
                    comment: { required: "Please enter your Comment." }
                },
                remote: {
                    url: "Account/feedbackForm",
                    type: "post",
                    dataType: "json",
                    data: {
                        username: function() {
                            return $("#name").val();
                            return $("#email").val();
                            return $("#country").val();
                            return $("#subject").val();
                            return $("#comment").val();
                        }
                    }
                }
            });
        });
        $.validator.setDefaults({
            submitHandler: function(form) { form.submit(); }
        });
    </script>

</asp:Content>
